package o;

import android.content.res.ColorStateList;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.widget.ProgressBar;
import com.huawei.skinner.annotation.SkinAdapter;
import com.huawei.skinner.annotation.SkinMethod;
import com.huawei.skinner.annotation.SkinMethods;

@SkinMethods({@SkinMethod(attribute = "indeterminateDrawable", method = "setIndeterminateDrawable", type = ProgressBar.class)})
public class fqq {
    @SkinAdapter("progressDrawable")
    public static void ॱ(ProgressBar progressBar, Drawable drawable) {
        Drawable progressDrawable = progressBar.getProgressDrawable();
        Rect rect = null;
        if (progressDrawable != null) {
            rect = new Rect(progressDrawable.getBounds());
        }
        progressBar.setProgressDrawable(drawable);
        if (rect != null) {
            progressBar.getProgressDrawable().setBounds(rect);
        }
    }

    @SkinAdapter("indeterminateTint")
    public static void ॱ(ProgressBar progressBar, ColorStateList colorStateList) {
        if (VERSION.SDK_INT >= 21) {
            progressBar.setIndeterminateTintList(colorStateList);
        }
    }

    @SkinAdapter("progressBackgroundTint")
    public static void ˏ(ProgressBar progressBar, ColorStateList colorStateList) {
        if (VERSION.SDK_INT >= 21) {
            progressBar.setProgressBackgroundTintList(colorStateList);
        }
    }

    @SkinAdapter("progressTint")
    public static void ˊ(ProgressBar progressBar, ColorStateList colorStateList) {
        if (VERSION.SDK_INT >= 21) {
            progressBar.setProgressTintList(colorStateList);
        }
    }

    @SkinAdapter("secondaryProgressTint")
    public static void ˎ(ProgressBar progressBar, ColorStateList colorStateList) {
        if (VERSION.SDK_INT >= 21) {
            progressBar.setSecondaryProgressTintList(colorStateList);
        }
    }
}
